//
//  TeacherCell.m
//  test1
//
//  Created by 衣尚品1 on 15/4/30.
//  Copyright (c) 2015年 衣尚品1. All rights reserved.
//

#import "TeacherCell.h"

@implementation TeacherCell

- (void)awakeFromNib {
    // Initialization code
//    [self SetUpStar];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

#pragma mark - 星星代码显示
-(void)SetUpStar{
    
    TQStarRatingView *starRatingView = [[TQStarRatingView alloc] initWithFrame:CGRectMake(212, 8, 100, 30) numberOfStar:5];
    
    //此方法一旦调用，评分就不可变
        [starRatingView StarScore:[self.score floatValue]];
    NSLog(@"%lf",[self.score floatValue]);
    
    starRatingView.delegate = self;
    
    [self addSubview:starRatingView];
    
}

- (IBAction)clickMessageButton:(id)sender {
    [[NSNotificationCenter defaultCenter] postNotificationName:@"MessageButton" object:self.nameLabel.text];
}

- (IBAction)clickAppointment:(id)sender {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"预约已发送" message:@"确认预约后老师会与你联系，请注意查收信息！" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
    [alert show];
}
@end
